<template>
	<view class="flex-col page">
		<view class="flex-col group">
			<view class="flex-col group_1">
				<view class="flex-col image-wrapper">
				</view>
				<view class="section_1"> </view>
				<view class="flex-row equal-division">
				</view>
			</view>
			<navbar></navbar>
			<view class="flex-col group_6">
				<view class="flex-col">
					<banner></banner>
					<view class="flex-col section_2">
						<view class="justify-between group_8">
							<text class="text_7">厨师推荐</text>
							<text class="text_8" @click="gohelp">使用帮助</text>
						</view>
						<view class="section_3"> </view>
					</view>
					<view class="flex-col list">
						<view v-for="(item,index) in list" :key="index">
							<cookitem :item="item"></cookitem>
						</view>
					</view>
				</view>
				<text class="text_63">没有更多啦</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		cooklist
	} from '../../config/api.js'
	import configs from '../../config/config.js'
	import banner from '../../components/banner.vue'
	import cookitem from '../../components/cookitem.vue'
	import navbar from '../../components/navbar.vue'
	export default {
		components: {
			banner,
			cookitem,
			navbar
		},
		data() {
			return {
				configs,
				list: []
			};
		},
		mounted() {
			this.cooklist()
		},
		methods: {
			cooklist() {
				var that = this;
				that.banner = []
				cooklist({}, {
					custom: {
						auth: true
					}
				}).then(res => {
					if (res.code == 1) {
						that.list = res.data
					}
				}).catch(err => {

				})
			},
			gohelp() {
				uni.navigateTo({
					url: '/pages/help/help'
				})
			}
		}
	};
</script>

<style scoped lang="scss">
	.page {
		background-color: rgb(242, 242, 242);
		width: 100%;
		height: 100%;
		overflow-y: auto;
		position: absolute;

		.group {
			padding-bottom: 29rpx;
			flex: 1 1 auto;
			overflow-y: auto;

			.group_1 {
				padding: 3rpx 0 132rpx;
				position: relative;

				.image-wrapper {
					padding: 18rpx 0 113rpx;
					background-color: rgb(254, 200, 70);

					.image {
						margin-left: 13rpx;
						width: 67rpx;
						height: 11rpx;
					}
				}

				.section_1 {
					background-image: url('http://images.wanjunshijie.com/product/cook/assets/f324b28b60918b52b5edf386d1d99448.png');
					background-size: 100% 100%;
					background-repeat: no-repeat;
					height: 237rpx;
					position: absolute;
					left: 0;
					right: 0;
					top: 40rpx;
				}

				.equal-division {
					position: absolute;
					left: 0;
					right: 0;
					top: 0;

					.equal-division-item {
						padding: 16rpx 18rpx 20rpx 27rpx;
						flex: 1 1 204rpx;

						.group_2 {
							padding: 0 34rpx;
							color: rgb(0, 0, 0);
							font-size: 24rpx;
							line-height: 18rpx;
							white-space: nowrap;
							position: relative;

							.text {
								text-transform: uppercase;
							}

							.image_1 {
								position: absolute;
								right: 34rpx;
								top: 50%;
								transform: translateY(-50%);
								width: 25rpx;
								height: 20rpx;
							}
						}

						.group_3 {
							margin-top: 45rpx;
							color: rgb(0, 0, 0);
							font-size: 24rpx;
							line-height: 24rpx;
							white-space: nowrap;

							.image_2 {
								margin: 8rpx -159rpx 10rpx 0;
								width: 12rpx;
								height: 6rpx;
							}

							.text_1 {
								margin-right: 9rpx;
							}
						}
					}

					.equal-division-item_1 {
						margin-left: 70rpx;
						padding: 17rpx 0 16rpx;
						flex: 1 1 204rpx;

						.group_4 {
							line-height: 18rpx;
							white-space: nowrap;

							.text_2 {
								color: rgb(0, 0, 0);
								font-size: 24rpx;
								line-height: 18rpx;
							}

							.text_3 {
								color: rgb(0, 0, 0);
								font-size: 24rpx;
								line-height: 18rpx;
							}

							.text_4 {
								color: rgb(0, 0, 0);
								font-size: 24rpx;
								line-height: 18rpx;
							}
						}

						.text_5 {
							margin-top: 40rpx;
							color: rgb(0, 0, 0);
							font-size: 36rpx;
							line-height: 34rpx;
							white-space: nowrap;
						}
					}

					.equal-division-item_2 {
						margin-left: 70rpx;
						padding: 13rpx 11rpx 85rpx;
						flex: 1 1 204rpx;
						color: rgb(0, 0, 0);
						font-size: 24rpx;
						line-height: 18rpx;
						white-space: nowrap;
						position: relative;

						.image_3 {
							margin-right: 8rpx;
							width: 15rpx;
							height: 27rpx;
						}

						.group_5 {
							margin: 4rpx 0;
							width: 108rpx;

							.image_4 {
								margin-left: 59rpx;
								width: 49rpx;
								height: 19rpx;
							}

							.text_6 {
								margin-left: -108rpx;
							}
						}

						.image_5 {
							width: 159rpx;
							height: 60rpx;
							position: absolute;
							top: 62rpx;
							left: 50%;
							transform: translateX(-50%);
						}
					}
				}
			}

			.group_6 {
				margin-top: -228rpx;
				padding-left: 24rpx;
				padding-right: 23rpx;
				position: relative;

				.text_63 {
					margin-top: 26rpx;
					align-self: center;
					color: rgb(172, 170, 170);
					font-size: 24rpx;
					line-height: 24rpx;
					white-space: nowrap;
				}


				.section_2 {
					margin-top: 14rpx;
					padding-left: 15rpx;
					padding-bottom: 11rpx;
					background-color: rgb(255, 255, 255);
					border-radius: 10rpx;
					border: solid 2rpx rgb(238, 238, 238);

					.group_8 {
						padding: 15rpx 0 2rpx;

						.text_7 {
							color: rgb(0, 0, 0);
							font-size: 30rpx;
							line-height: 28rpx;
							white-space: nowrap;
						}

						.text_8 {
							margin-right: 5rpx;
							margin-top: 4rpx;
							color: rgb(158, 156, 156);
							font-size: 24rpx;
							line-height: 24rpx;
							white-space: nowrap;
						}
					}

					.section_3 {
						background-color: rgb(249, 182, 2);
						width: 52rpx;
						height: 3rpx;
					}
				}

				.list {
					padding-top: 16rpx;

				}
			}
		}
	}

</style>
